<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script src="../js/01-JavaScript基础.js"></script>
    <script type="text/javascript">
        // console.log(a);
        let a = 10;
        for(let i = 10; i > 0; i--) {

        }
        // console.log(i);
        //常量不允许修改值
        const b = 10;
        // b = 100;
        const obj = new Object({
            name: "haha",
            age: 18
        });
        obj.name = "张三";
        console.log(obj);

        {
            //这就是一个块作用域
            let a = 1000;console.log(a);
            var m = 10000;
        }
        console.log(m);

        /**
         * 这是文档注释，
         * t1只是一测试函数
         */
        function t1() {
            console.log(a);
            console.log(f);
            var c = 20;//局部变量，只在函数的{}之内
            // d = 30;变会成全局变量，不建议使用
        }

        // console.log(c);
        // console.log(d);

        let e = 40, f = 50, g;
        console.log(e);
        console.log(f);
        console.log(g);
        t1();
    </script>

    <script>
        console.log("a:" + a);
        console.log("h:" + h);
        console.log("j:" + j);
        console.log(a, b, h);
    </script>
</body>
</html>